import {
    createRouter,
    createWebHashHistory
} from "vue-router";

const routes = [
    {
        path: '/',
        name: 'index',
        component: () => import('@/views/index/index.vue'),
        meta: {
            title: "首页"
        }
    },
    {
        path: '/video',
        name: 'video',
        component: () => import('@/views/Video/video.vue'),
        meta: {
            title: "博物馆短视频"
        }
    },
    {
        path: '/chat',
        name: 'chat',
        component: () => import('@/views/Chat/chat.vue'),
        meta: {
            title: "ChronoMuseum智慧助手"
        }
    },
    {
        path: '/mine',
        name: 'mine',
        component: () => import('@/views/Mine/mine.vue'),
        meta: {
            title: "我的"
        }
    },
	{
		path: '/login',
		name: 'login',
		component: () => import('@/views/Mine/login.vue'),
		meta: {
		    title: "登录"
		}
	},
	{
		path: '/reg',
		name: 'reg',
		component: () => import('@/views/Mine/reg.vue'),
		meta: {
		    title: "注册"
		}
	},
	{
		path: '/codelogin',
		name: 'codelogin',
		component: () => import('@/views/Mine/codelogin.vue'),
		meta: {
		    title: "验证码登录"
		}
	},
	{
		path: '/shop',
		name: 'shop',
		component: () => import('@/views/Shop/shop.vue'),
		meta: {
		    title: "时光商城"
		}
	},
	{
		path: '/more',
		name: 'more',
		component: () => import('@/views/Shop/more.vue'),
		meta: {
		    title: "分类"
		}
	},
	{
		path: '/detail',
		name: 'detail',
		component: () => import('@/views/Shop/detail.vue'),
		meta: {
		    title: "商品详情"
		}
	},
	{
		path: '/detail/:id',
		name: 'ExhibitionList',
		component: () => import('@/views/index/detail/detail.vue'),
		props: true,
		meta: {
			title: "详情页"
		}
	}
];

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

export default router;